const explain = require("explain")
const uniID = require('uni-id')

module.exports = class hospital extends explain.service {
	async getHospitals(params) {
		const payload = await uniID.checkToken(params.token)
		if (payload.code) {
			return payload
		}
		const db = uniCloud.database()
		return await db.collection('hospitals').get()
	}
}
